/*
 *    Copyright (c) 2018-2025, boss All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the boss developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: boss
 */

package com.hopes.bizz.close.visitor.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.hopes.bizz.close.common.constant.enums.ParkCloseModDictEnum;
import com.hopes.bizz.close.common.constant.enums.ParkCloseSysDictEnum;
import com.hopes.boss.admin.api.resolver.DictResolver;
import com.hopes.boss.admin.api.resolver.enums.AdminDictEnum;
import com.hopes.boss.admin.api.resolver.enums.SysDictEnum;
import com.hopes.boss.common.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * 物流单危化品关系
 *
 * @author pig
 * @date 2024-02-17 15:35:17
 */
@Data
@TableName(value = "closed_apply_goods_rel", excludeProperty = "tenantId")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "物流单危化品关系")
public class ClosedApplyGoodsRelEntity extends BaseEntity {

    private static final long serialVersionUID = 1L;


	/**
	* ID
	*/
    @TableId(type = IdType.ASSIGN_ID)
    @Schema(description="ID")
    private Long id;

	/**
	* 机构ID
	*/
    @Schema(description="机构ID")
    private Long orgId;

	/**
	* 物流单ID
	*/
    @Schema(description="物流单ID")
    private Long applyId;

	/**
	* 企业危化品物资id
	*/
    @Schema(description="企业危化品物资id")
    private Long goodsId;

	/**
	* 运输数量
	*/
    @Schema(description="运输数量")
    private BigDecimal transferNum;

	/**
	* 物资进出方向
	*/
    @Schema(description="物资进出方向")
    private String inOutDirection;

	/**
	* 是否危废
	*/
    @Schema(description="是否危废")
    private String hazardWasteFlag;

	/**
	* 是否入库
	*/
    @Schema(description="是否入库")
    private String inWarehouseFlag;

	/**
	* 出入园时间
	*/
    @Schema(description="出入园时间")
    private Date inOutTime;

	/**
	* 备注
	*/
    @Schema(description="备注")
    private String remarks;

	public String getHazardWasteFlagStr() {
		return DictResolver.getItemLabelByValue(SysDictEnum.yes_no_type, this.getHazardWasteFlag());
	}

    public String getGoodsIdStr() {
		return DictResolver.getItemLabelByValue(ParkCloseModDictEnum.closed_hazard_goods, this.getGoodsId());
	}

    public String getOrgIdStr() {
    	return DictResolver.getItemLabelByValue(AdminDictEnum.sys_company, this.getOrgId());
	}


	public String getInOutDirectionStr() {
    	return DictResolver.getItemLabelByValue(ParkCloseSysDictEnum.close_visitor_record_direction_type, this.getInOutDirection());
	}

}
